import RequestItem = cc.AssetManager.RequestItem;

export interface IResourceManager {

    getBundle(name:string):cc.AssetManager.Bundle;

    load<T extends cc.Asset>(paths: string|string[], type: typeof cc.Asset,  onComplete: (error: Error, assets: T|Array<T>) => void,onProgress?: (finish: number, total: number, item: RequestItem) => void):void

    loadTextAsset(paths: string|string[],  onComplete: (error: Error, assets: cc.TextAsset|Array< cc.TextAsset>) => void,onProgress?: (finish: number, total: number, item: RequestItem) => void):void;
    loadJsonAsset(paths: string|string[],  onComplete: (error: Error, assets: cc.JsonAsset|Array< cc.JsonAsset>) => void,onProgress?: (finish: number, total: number, item: RequestItem) => void):void;

    loadSoundAsset(paths: string|string[], type: cc.AudioClip,  onComplete: (error: Error, assets:  cc.AudioClip|Array<cc.AudioClip>) => void,onProgress?: (finish: number, total: number, item: RequestItem) => void);

    loadUIAsset(paths: string,onComplete:(error:Error,assets:cc.Prefab|Array<cc.Prefab>)=>void,onProgress?: (finish: number, total: number, item: RequestItem) => void);
    UnloadAsset(asset:string,type:typeof cc.Asset);
}